function ClearFigure(type)

h=findobj('tag',type);
delete(h)